package com.gwtjs.icustom.pojo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * @author : [aGuang]
 * @version : [v1.0]
 * @className : ClassEntity
 * @description : [班级实体]
 * @createTime : [2022/11/18 15:47]
 * @updateUser : [aGuang]
 * @updateTime : [2022/11/18 15:47]
 * @updateRemark : [描述说明本次修改内容]
 */
@Entity
//指定创建之后的表名和创建索引
@Table(name = "jpa_class",
    indexes = {@Index(name = "index_class_name",columnList = "class_name")}
)
//添加表的注释
@org.hibernate.annotations.Table(appliesTo = "jpa_class",comment = "班级表")
public class ClassEntity extends BaseEntity{

    @Id
    @Column(name = "class_id",columnDefinition = "bigint(20) COMMENT '学号'",nullable = false)
    private Long id;
    
    @Column(name ="class_name",nullable = false,columnDefinition = "varchar(32) COMMENT '班级名'")
    private String className;
   
    @Column(name="address",nullable = false,columnDefinition = "varchar(128) COMMENT '班级地址'")
    private String address;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
